﻿namespace Probel.Ldoc.Shell.Tools
{
    using System;
    using System.Management;

    public class SysInfo
    {
        #region Constructors

        private SysInfo(string serial, string version)
        {
            this.Serial = serial;
            this.Version = version;
        }

        #endregion Constructors

        #region Properties

        public string Serial
        {
            get;
            private set;
        }

        public string Version
        {
            get;
            private set;
        }

        #endregion Properties

        #region Methods

        public static SysInfo Load()
        {
            ManagementObject os = new ManagementObject("Win32_OperatingSystem=@");

            return new SysInfo((string)os["SerialNumber"], Environment.OSVersion.ToString());
        }

        #endregion Methods
    }
}